#include "Player.h"

CPlayer::CPlayer(void)
{
	m_iBalance = 0;
	m_iDirection = 4;
	m_Position.x = 0;
	m_Position.y = 0;
	m_iOrder = 0;
	m_iAIstatus = 0;
	m_iIcon = 0;
	m_iRob = 0;

	memset(m_cName, NULL, sizeof(m_cName));

	m_bIsDown = false;
	m_bIsUp = false;
	m_bIsRight = false;
	m_bIsLeft = false;
}

CPlayer::~CPlayer(void)
{
}

void CPlayer::SetName(char *c)
{
	int i = 0;
	while(c[i] != NULL)
		m_cName[i] = c[i++];
}

void CPlayer::ClearPossibleDirection()
{
	m_bIsDown = false;
	m_bIsUp = false;
	m_bIsRight = false;
	m_bIsLeft = false;
}

void CPlayer::SetPossibleDirection(bool right, bool left, bool up, bool down)
{
	m_bIsDown = down;
	m_bIsUp = up;
	m_bIsRight = right;
	m_bIsLeft = left;
}

void CPlayer::GetPossibleDirection(bool &right, bool &left, bool &up, bool &down)
{
	down = m_bIsDown;
	up = m_bIsUp;
	left = m_bIsLeft;
	right = m_bIsRight;
}